package com.demo01.service.impl;

import com.demo01.dao.User1Dao;
import com.demo01.pojo.User1;
import com.demo01.service.User1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("user1Service")
public class User1ServiceImpl implements User1Service {
    @Autowired
    User1Dao user1Dao;

    @Override
    @Transactional(propagation = Propagation.REQUIRED)
    public void addRequired(User1 user1) {
        user1Dao.insert(user1);
    }
}